﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using WmsApp.WmsService;

namespace WmsApp.Service
{
    public class PayApplyBillDtlService : IEntityService<PayApplyBillDtl, PayApplyBillDtlService>
    {
        #region IEntityService<PayApplyBillDtl> Members

        public List<PayApplyBillDtl> GetEntityList()
        {
            var sc = Factory.WmsServiceFactory.GetServiceClient();
            List<PayApplyBillDtl> list = sc.GetPayApplyBillDtls();
            foreach (var payApplyBillDtl in list)
            {
                payApplyBillDtl.BindPropertyChanged();
            }
            return list;
        }

        public List<PayApplyBillDtl> GetEntityList(string condition)
        {
            var sc = Factory.WmsServiceFactory.GetServiceClient();
            List<PayApplyBillDtl> list = sc.GetPayApplyBillDtlsByCondition(condition);
            foreach (var payApplyBillDtl in list)
            {
                payApplyBillDtl.BindPropertyChanged();
            }
            return list;
        }

        public void SaveEntityList(List<PayApplyBillDtl> list)
        {
            throw new NotFiniteNumberException();
        }

        public PayApplyBillDtl GetEntity(string key)
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}
